
class CCTVCameraModel{
  List<CCTVModel>? cctv;
  int? pageIndex;
  int? pageSize;
  int? totalCount;
  int? totalPages;

  CCTVCameraModel.fromJson(Map<String, dynamic> json) {
    if (json['cctv'] != null) {
      cctv = (json['cctv'] as List).map((i) => CCTVModel.fromJson(i as Map<String,dynamic>)).toList();
    }
    pageIndex = json['pageIndex'];
    pageSize = json['pageSize'];
    totalCount = json['totalCount'];
    totalPages = json['totalPages'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    if (this.cctv != null) {
      data['cctv'] = cctv!.map((v) => v.toJson()).toList();
    }
    data['pageIndex'] = pageIndex;
    data['pageSize'] = pageSize;
    data['totalCount'] = totalCount;
    data['totalPages'] = totalPages;
    return data;
  }

  @override
  String toString() {
    return 'CCTVCameraModel{cctv: $cctv}';
  }
}

class CCTVModel{
  String? flvUrl;
  String? name;
  int? sort;
  String? code;
  String? cnName;
  String? enName;
  String? ipAddress;
  int? port;
  String? userName;
  String? passWord;
  int? state;
  String? cameraSvrSn;
  String? city;
  String? region;
  String? area;
  String? id;
  String? stateName;
  String? createdAt;
  String? modifyAt;

  CCTVModel.fromJson(Map<String, dynamic> json) {
    flvUrl = json['flvUrl'];
    name = json['name'];
    sort = json['sort'];
    code = json['code'];
    cnName = json['cnName'];
    enName = json['enName'];
    ipAddress = json['ipAddress'];
    port = json['port'];
    userName = json['userName'];
    passWord = json['passWord'];
    state = json['state'];
    cameraSvrSn = json['cameraSvrSn'];
    city = json['city'];
    region = json['region'];
    area = json['area'];
    id = json['id'];
    stateName = json['stateName'];
    createdAt = json['createdAt'];
    modifyAt = json['modifyAt'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data['flvUrl'] = flvUrl;
    data['name'] = name;
    data['sort'] = sort;
    data['code'] = code;
    data['cnName'] = cnName;
    data['enName'] = enName;
    data['ipAddress'] = ipAddress;
    data['port'] = port;
    data['userName'] = userName;
    data['passWord'] = passWord;
    data['state'] = state;
    data['cameraSvrSn'] = cameraSvrSn;
    data['city'] = city;
    data['region'] = region;
    data['area'] = area;
    data['id'] = id;
    data['stateName'] = stateName;
    data['createdAt'] = createdAt;
    data['modifyAt'] = modifyAt;
    return data;
  }

  @override
  String toString() {
    return 'CCTVModel{name: $name, sort: $sort, code: $code, cnName: $cnName, enName: $enName, ipAddress: $ipAddress, port: $port, userName: $userName, passWord: $passWord, state: $state, cameraSvrSn: $cameraSvrSn, city: $city, region: $region, area: $area, id: $id, stateName: $stateName, createdAt: $createdAt, modifyAt: $modifyAt}';
  }
}